/*
 * @Author: 崔旭亮
 * @Email: 326320961@qq.com
 * @Date: 2020-06-10 15:56:23
 * @Last Modified by: 崔旭亮
 * @Last Modified time: 2020-06-24
 * @Description: 网络请教对象类，相当于BAL
 * ///请求示例
  // Future<Response> register({ @required String code, String city,}) {
  //   return _dio.post(
  //     '/user/email/register',
  //     queryParameters: {
  //       "code": code,
  //       "city": city,
  //     }
  //   );
  // }

  //调用示例
  //import 'package:flutter_code_framework/utils/global.dart';
  //var rs = await G.req.user.register(code:'',city:'');
 */

import 'package:dio/dio.dart';
import 'package:flutter_code_framework/utils/global.dart';
import 'package:flutter/foundation.dart';

/// 资源中心
class ReqResource {
  final Dio _dio;

  ReqResource(this._dio);

  Future<Response> getFineResourcesList(
      {@required String bookId,
        @required String sectionId,
        @required String type,
        @required String keyword,
        @required String pageIndex,
        @required String pageSize,
        @required String selectTime}) {
    return _dio.get('/resources/getFineResourcesList', queryParameters: {
      "bookId": bookId,
      "sectionId": sectionId,
      "type": type,
      "keyword": keyword,
      "pageIndex": pageIndex,
      "pageSize": pageSize,
      "selectTime": selectTime,
    });
  }
}
